package cn.lingyangwl.agile.msg.push.model.mq;

import cn.lingyangwl.agile.model.module.mq.AbstractMQ;
import cn.lingyangwl.agile.model.module.mq.BaseMqPayload;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenguangyang
 */
public class ChannelDefineMQ extends AbstractMQ {
    public static final String QUEUE = "msg_push:msh_channel_update";
    public static final String EXCHANGE = "msg_push:msh_channel_exchange";

    public ChannelDefineMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    public static class MsgPayload extends BaseMqPayload {
        /** 通知单号 **/
        private Long msgChannelId;
    }

    public static ChannelDefineMQ build(Long msgChannelId){
        return new ChannelDefineMQ(new MsgPayload(msgChannelId));
    }

}
